have an advanced PDF that i am trying to display a...
# general
n
have an advanced PDF that i am trying to display a serial list at the bottom, we have managed to get the filtering working and the list displaying only issue is if the item is lot numbered it is also pulling a value, i need to it to completely exclude anything thats serial. this is my code at present. I tried adding a piece of logic to look at the item field iserialitem but it then just hid the whole list. I tried putting a custom field on the item fulfilment directly with a true false for is serial and it did the same thing. I feel i am close but i am not strong in this area so i cant quite figure this out. Current code in PDF tr style="background-color: #D3D3D3;" th colspan="3"Serial List/th /tr #assign columnCount = 3 <!-- Number of columns per row --> #list record.item as tranline <#assign details = tranline.inventorydetail?split("br /")> <!-- Filter out valid serial numbers --> #assign validSerials = [] #list details as detail #assign serialNumber = detail?keep_before(",")?trim #if serialNumber != "" && !serialNumber?matches("(?i)X(\\s*\\(.*\\))?") #assign validSerials = validSerials + [serialNumber] /#if /#list <!-- Only display the product section if there are valid serials --> #if validSerials?size gt 0 <!-- Print Product Name and Description in Normal Style (No Grey Background) --> tr th colspan="${columnCount}" style="background-color: transparent;"${tranline.item} - ${tranline.custcol_sales_description}/th /tr #assign count = 0 #list validSerials as serialNumber #if count % columnCount == 0 tr <!-- Start a new row --> /#if td${serialNumber}/td #assign count = count + 1 #if count % columnCount == 0 /tr <!-- Close row when columnCount is reached --> /#if /#list <!-- Close the last row if it's incomplete --> #if count % columnCount != 0 #assign remaining = columnCount - (count % columnCount) #list 1..remaining as i td/td /#list /tr /#if /#if <!-- End check for valid serials --> /#list The extra logic i tried to add was <!-- Only include serial numbers if the item is serialized #if tranline.item.isserialitem?has_content && tranline.item.isserialitem?string == "T" and also #if tranline.item.isserialitem?string == "T" Neither of these worked